package com.linln.modules.member.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.linln.modules.member.domain.Notice;

/**
 * @author hct
 * @date 2019/10/11
 */
public interface NoticeRepository extends JpaRepository<Notice, Long> {
	
	@Modifying
	@Transactional
	@Query("update Notice set isread = ?1  where id in ?2 ")
	public Integer updateIsReadById(Integer status,List<Long> ids);
	@Modifying
	@Transactional
	@Query("update Notice set isread = ?1  where id = ?2 ")	
	public Integer updateIsReadById(Integer status,Long id);

}